#ifndef COMDATA_H
#define COMDATA_H

#include <QObject>
#include <QSerialPort>
#include <QSerialPortInfo>

class ComData : public QObject
{
    Q_OBJECT
public:
    explicit ComData(QObject *parent = NULL);
    virtual ~ComData();

    static ComData * gestance();

    void sendSerielInfor(QString infors);

    void sendEndInfor(QString infors);
    void sendStatusInfor(QString infors);
signals:
    void sigCheckStatus(int statuses);

public slots:
    void onAddSerielComInfor();
    void onRemoveSerielComInfor();
    void onRecSerialData();


private:

    QSerialPort * m_serialPort;
    QString m_curentPortName;

    QString m_currentInfor;
};

#endif // COMDATA_H
